package org.javaopenaccess.model;

import java.util.Set;

import org.javaopenaccess.command.UserCommand;

/**
 * This class models the user and it's connections to 
 * the database.
 * @author Miku
 *
 */
public class User {
	
	private String firstName;
	private String lastName;
	private String userName;
	private String password;
	private String email;
	private Set<Schema> schemas;
	/**
	 * Parameter constructor.
	 * @param email
	 * @param firstName
	 * @param lastName
	 * @param password
	 * @param schemas
	 * @param userName
	 */
	public User(String email, String firstName,
			String lastName, String password, Set<Schema> schemas,
			String userName) {
		super();
		this.email = email;
		this.firstName = firstName;
		this.lastName = lastName;
		this.password = password;
		this.schemas = schemas;
		this.userName = userName;
	}
	
	public User (String userName){
		this.userName = userName;
	}
	
	public User(UserCommand userCommand) {
		this.userName = userCommand.getUserName();
		this.password = userCommand.getPassword();
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String name) {
		this.firstName = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Set<Schema> getSchemas() {
		return schemas;
	}
	public void setSchemas(Set<Schema> schemas) {
		this.schemas = schemas;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	} 
}
